<?php 
	require '../../frame/base.php';
	if(!isset( $_GET['cateId']) || !is_numeric( $_GET['cateId'])){
		echo json_encode(array('code'=>-200,'msg'=>'获取失败'));
		exit;
	}
	$page = 0;
	$pagesize = 10;
	if(isset($_GET['page'])){
		$page = (int)$_GET['page'];
	}
	if(isset($_GET['pagesize'])){
		$pagesize = (int)$_GET['pagesize'];
	}
	$page *= $pagesize;
	$cateId = $_GET['cateId'];
	$result = $Db->table('shop')->field('head_pic,name,images,short_name,shopid')->where(array('check'=>1,'open'=>1,'leimu'=>$cateId))->limit($page,$pagesize)->select();

	echo json_encode(array('code'=>200,'msg'=>'ok','data'=>$result));